package com.das.cloud.system;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

//import com.das.cloud.auth.client.EnableAuthClient;
//import com.das.cloud.auth.client.EnableAuthClient;
import com.liy.framework.common.extvo.LoginInfo;
//import com.das.framework.common.logs.EnableDBLogs;
//import com.das.cloud.auth.client.EnableAuthClient;
//import com.das.framework.common.swagger2.EnableSwagger2;
import com.das.framework.common.utils.ContextHandler;

@SpringBootApplication
@RestController
//@ServletComponentScan	//加载过滤器
//@EnableDBLogs
@MapperScan({"com.das.cloud.system.dao","com.das.cloud.osc.common.base.dao"})
@ComponentScan({ "com.das.cloud.system.service","com.das.cloud.system.controller" })
//@EnableAuthClient
//@EnableSwagger2
// 需要国际化时导入
//@ComponentScan({ "com.das.framework.common.i18n"})
public class SystemApplication {

	public static void main(String[] args) {
		SpringApplication.run(SystemApplication.class, args);
	}

	@RequestMapping("/")
	public String index() {
		LoginInfo loginUser = ContextHandler.getLoginUser();
		return loginUser.getAccount() + ", 欢迎使用系统基础服务!";
	}
}
